Chapter 5: Implementation of
Discrete-Time Systems
Dr. Hussein Hijazi
hussein.hijazi@liu.edu.lb
Digital Signal Processing
1
Structure for Realization of DT Syst. (Cont’d) 1 BIU - LIU: Dr. Hijazi
2
An LTI system can be either FIR or IIR. Various structures for the realization of DT.
FIR system can be implemented in several methods: (order: M-1)
Direct Form
Cascade Form
Lattice Form
IIR system can be implemented in several methods: (orders: M et N)
Direct Form I or II
Cascade Form
Parallel Form
Lattice-Ladder Form
Structure for the Realization of DT Systems 1 BIU - LIU: Dr. Hijazi
3
Major factors that influence our choice of a specific realization are:
Computational complexity: Number of arithmetic operations (multiplications,
divisions, and additions), number of a fetch from a memory and number of
comparison between two numbers (programmable DSP chips) required to compute
an output value y(n).
Memory requirements: Number of memory locations required to store the system
parameters, past inputs, past outputs, and any intermediate computed values.
Finite-word-length effects or finite-precision: Due to quantization effects (in
hardware or in software), the parameters of the system must necessarily be
represented with finite precision and the computations of an output from the
system must be rounded off or truncated to fit within the limited precision
constraints of the computer or the hardware used in the implementation.
Other factors: Such as whether the structure lends to parallel processing or whether
the computations can be pipelined. These additional factors are usually important
in the realization of more complex digital signal processing algorithms.
FIR System: Direct Form 2 BIU - LIU: Dr. Hijazi
4
Direct Form:
(M-1) memory locations
to store (M-1) previous inputs
M multiplications
(M-1) additions
Note: if h(n) is symmetry
or asymmetry reduce
nb of multipliers from M
to M/2 (M even) or (M-1)/2
(M odd).
FIR System: Cascade Form 3 BIU - LIU: Dr. Hijazi
5
Cascade Form: The idea is to factor H(z) into second-order FIR systems.
Example: Implement in Direct Form and cascade
H(z) = 1 + 2z-1 + 4z-2 + 8z-3 or H(z) = 1 + 2z-1 + 2z-2 + z-3
FIR System: Lattice Form (Cont’d) 4 BIU - LIU: Dr. Hijazi
8
Lattice Form: A FIR of order (M-1) consists of (M-1) stage lattice filters
Each stage has a reflection coefficient there are (M-1) coefficients {K1 , K2 , . , KM-1}.
FIR System: Lattice Form (Cont’d) 4 BIU - LIU: Dr. Hijazi
9
Conversion of direct-form FIR filter coefficients to lattice coefficients:
{b0 , b1 , b2 , , bM-1} {K1 , K2 , . , KM-1}.
We compute all lower-degree polynomials Am(z) beginning with AM-1(z) = H(z) using
step-down recursive equations
Note: Bm(z) is called reciprocal or reverse polynomial of Am(z).
FIR System: Lattice Form (Cont’d) 4 BIU - LIU: Dr. Hijazi
10
Example: Implement in lattice form H(z) = 1 + 2z-1 + 4z-2 + 8z-3
FIR System: Lattice Form 4 BIU - LIU: Dr. Hijazi
11
Conversion of lattice coefficients to direct-form filter coefficients.
{K1 , K2 , . , KM-1} {b0 , b1 , b2 , , bM-1}
At the end of the procedure, H(z) = AM-1(z).
IIR System: Direct Form I and II (Cont’d) 5 BIU - LIU: Dr. Hijazi
12
IIR System: Direct Form I and II 5 BIU - LIU: Dr. Hijazi
13
Example: Implement G(z) in Direct Form II
IIR System: Cascade (Cont’d) 6 BIU - LIU: Dr. Hijazi
14
Cascade Form: The system can be factored into a cascade of second-order
subsystems
IIR System: Cascade 6 BIU - LIU: Dr. Hijazi
15
Example: Implement G(z) in Cascade Form
IIR System: Parallel Form (Cont’d) 7 BIU - LIU: Dr. Hijazi
17
Parallel-form realization of an IIR system can be obtained by performing a partial-
fraction expansion of H(z).
Note: C = bN /aN (M = N) or C = 0 (M < N) or C = poly. of degree M-N (M > N)
IIR System: Parallel Form (Cont’d) 7 BIU - LIU: Dr. Hijazi
18
Example: Implement G(z) in parallel Form
IIR System: Parallel Form 7 BIU - LIU: Dr. Hijazi
20
IIR System: Lattice-Ladder (Cont’d) 8 BIU - LIU: Dr. Hijazi
21
All-pole system:
Lattice structure of all-zero AN(z) ==== > Lattice structure of 1/ AN(z)
Stability:
Roots of AN(z) lie inside the unit circle <==> |Km| < 1 for all m <==> Stable
IIR System: Lattice-Ladder (Cont’d) 8 BIU - LIU: Dr. Hijazi
22
Example: Implement in lattice structure H(z) = 1/(1 + 2z-1 + 4z-2 + 8z-3)
We start implementing all-zero system in lattice A3(z) = 1 + 2z-1 + 4z-2 + 8z-3 slide 8
By modifying the interconnections, we obtain the lattice structure of all-pole system
H(z)
IIR System: Lattice-Ladder (Cont’d) 8 BIU - LIU: Dr. Hijazi
23
Zero-pole system:
{v0, v1, …, vN} CM(z) as follows:
IIR System: Lattice-Ladder (Cont’d) 8 BIU - LIU: Dr. Hijazi
24
Example: Implement in lattice structure
First we implement all-zero system A3(z) = 1 + 2z-1 + 4z-2 + 8z-3 in lattice form
Then we deduce the lattice implementation of all-pole system 1/A3(z) slide 18
Then we add the ladder by computing its coefficients vm using
C3(z) = 1 + 4z-1 + 8z-2 + 32z-3
IIR System: Lattice-Ladder 8 BIU - LIU: Dr. Hijazi
25
Check the stability of the system.
Quiz 9 BIU - LIU: Dr. Hijazi
26
Consider the IIR system with system function:
1) Show that 󰇛󰇜 
 

2) Implement G(z) in direct form II
3) Implement G(z) in cascade form
4) Implement G(z) in parallel form
5) Implement G(z) in lattice-ladder form. Is the system stable?
Appendix:
12
21 (1 4 )(1 8 )
( ) (1 4 )(1 2 ) ( ) ()
zz
H z z z G z Hz

 
G󰇛󰇜 󰇜󰇛
󰇛󰇜󰇛󰇜
Chapter 6: Design of Digital Filters
Dr. Hussein Hijazi
hussein.hijazi@liu.edu.lb
Digital Signal Processing
1
Introduction 1 BIU - LIU: Dr. Hijazi
2
The ideal filters cannot be physically realized and implemented in practice
In practice, the implementation of a desired filter is based on some specifications in
frequency domain (magnitude and phase response of the filter).
Several methods for designing FIR or IIR digital filters
In the filter design process, we determine the coefficients of a causal FIR or IIR filter that
closely approximates the desired frequency response specifications.
The issue of which type of filter to design, FIR or IIR, depends on the nature of the problem
and on the specifications of the desired frequency response.
Requirement of linear phase (no phase distortion) within the passband of the filter FIR
IIR has lower sidelobes in the stopband than an FIR filter having the same number of parameters.
If some phase distortion (nonlinear phase) is tolerable, an IIR filter is preferable, primarily because its
implementation involves fewer parameters, requires less memory and has lower computational
complexity.
Ideal Filters 2 BIU - LIU: Dr. Hijazi
3

Consider an ideal lowpass filter with zero-phase defined by H(ω)
F-1
h(n) is noncausal physically unrealized in practice
This conclusion hold for all the other ideal filters
What are the necessary and sufficient conditions that a frequency response characteristic
H(ω) must satisfy in order for the resulting filter to be causal? The answer is given by the
Paley-Wiener theorem .
Causality of Ideal Filters (Cont’d) 3 BIU - LIU: Dr. Hijazi
4
Paley-Wiener Theorem: If h(n) has finite energy and h(n) = 0 for n < 0, then
Conclusions drawn from Paley-Wiener Theorem:
Frequency response H(ω) cannot be zero, except at a finite set of points in frequency.
Magnitude |H(ω)| cannot be constant in any finite range (small amount of ripple)
Transition from passband to stopband cannot be infinitely sharp (infinitely sharp cutoff)
Real and imaginary parts of H(ω) are interdependent
As a consequence, |H(ω)| and phase θ(ω) of H(ω) cannot be chosen arbitrarily.
The basic LTI digital filter design problem is to approximate any of the ideal frequency
response characteristics by properly selecting the coefficients {ak } and {bk }.
Causality of Ideal Filters 3 BIU - LIU: Dr. Hijazi
5
Characteristics of Practical Filters 4 BIU - LIU: Dr. Hijazi
6
In any filter design problem, we specify:
ωp: passband edge frequency
ωs: stopband edge frequency
| ωs - ωp | : width of the transition band
δ1 = δp : maximum tolerable passband ripple
δ2 = δs : maximum tolerable stopband ripple
Based on these specifications, we can select the filter coefficients {ak} and {bk} and the orders M and N,
which best approximate the desired specification.
The degree to which H(ω) approximates the specifications depends in part on the criterion used in the
selection of filter parameters.
ωp: edge of the passband
ωs: edge of the stopband
| ωs - ωp | : width of the transition band
Bandwidth: width of the passband (if LPF Bandwidth = ωp)
δ1 = δp : passband ripple
δ2 = δs : stopband ripple in decibel (dB) 20log10(δs)
FIR Filter Design (Cont’d) 5 BIU - LIU: Dr. Hijazi
7
Design of filter can be: FIR-based or IIR-based
FIR-based design: Several methods for designing linear-phase FIR filters.
Design of Linear-Phase FIR Filters Using Windows
Specifications: (ωs ; δs ) and (ωp ; δp )
Procedure:
1) δs (dB) using the table (slide 8) to identify the type of the window w(n)
2) Using the relation for the selected window compute the filter length as
N = cte/Δf where Δf = | ωs - ωp | /2π
3) Find hd(n), the impulse response of the ideal filter with ωc = (ωs + ωp ) /2 , by
using the inverse Fourier transform
4) Shift to the right by N/2 hd(n) and then truncate by the window
h(n) = hd(n-N/2)w(n) for 0 n N-1
FIR Filter Design (Con’d’) 5 BIU - LIU: Dr. Hijazi
8
Example 1: FIR Design of a filter with the following specifications
Example 2:
FIR Filter Design 5 BIU - LIU: Dr. Hijazi
9
IIR Filter Design: Butterworth Filter (Cont’d) 6 BIU - LIU: Dr. Hijazi
12
The N poles of H(s) lie in left-half s-plane
s = T(z) H(z)
IIR Filter Design: Butterworth Filter (Cont’d) 6 BIU - LIU: Dr. Hijazi
13
IIR Filter Design: Butterworth Filter 6 BIU - LIU: Dr. Hijazi
14